-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always track file-based layers in QFieldCloud #5118
base: master
Are you sure you want to change the base?
Conversation
If the layer is configured as "NO_ACTION" for QFieldCloud, then this layer is never tracked for changes in QFieldCloud. This means any changes on this layer will never reach QFieldCloud. This development ignores whatever is configured as cloud action. When the layer is file-based and it is not configured as "REMOVE", then the layer will be tracked by QFielCloud.
🎉 Ta-daaa, freshly created APKs are available for fba35ba: arm64-android |
Co-authored-by: Matthias Kuhn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
} | ||
|
||
if ( !layer->dataProvider() ) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'const QgsDataProvider *' -> bool [readability-implicit-bool-conversion]
{ | |
if ( layer->dataProvider() == nullptr ) |
|
||
QgsProviderMetadata *providerMetadata = QgsProviderRegistry::instance()->providerMetadata( layer->dataProvider()->name() ); | ||
QVariantMap metadata = providerMetadata->decodeUri( layer->source() ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'metadata' of type 'QVariantMap' (aka 'QMap<QString, QVariant>') can be declared 'const' [misc-const-correctness]
QVariantMap const metadata = providerMetadata->decodeUri( layer->source() ); |
if ( resolvedFilename.startsWith( QStringLiteral( "localized:" ) ) ) | ||
{ | ||
return QFile::exists( resolvedFilename.mid( 10 ) ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
return QFile::exists( resolvedFilename.mid( 10 ) );
^
/** | ||
* Returns if the \a layer is a file-based or a remote layer. | ||
* | ||
* @param layer to be checked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: member variable 'username' has public visibility [misc-non-private-member-variables-in-classes]
QString username;
^
* Returns if the \a layer is a file-based or a remote layer. | ||
* | ||
* @param layer to be checked | ||
* @return const bool true if the layer is file-based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: member variable 'email' has public visibility [misc-non-private-member-variables-in-classes]
QString email;
^
@suricactus , is this still relevant? |
If the layer is configured as "NO_ACTION" for QFieldCloud, then this layer is never tracked for changes in QFieldCloud. This means any changes on this layer will never reach QFieldCloud.
This development ignores whatever is configured as cloud action. When the layer is file-based and it is not configured as "REMOVE", then the layer will be tracked by QFielCloud.